package com.lottery.im.api.result.entity.bank;

import android.databinding.BindingAdapter;
import android.widget.ImageView;
import com.bumptech.glide.Glide;
import com.bumptech.glide.request.RequestOptions;
import com.lottery.im.R;
import com.lottery.im.api.Api;
import java.io.Serializable;

/**
 * 作者：cyy
 * 时间：2018/9/26。
 */
public class BankList implements Serializable {

  /**
   * bankUrl : https://www.baidu.com/
   * inMax : 100000
   * inMin : 10
   * bankType : RCB
   * state : 0
   * needAccount : 0
   * bankName : 农村信用社
   * seqId : 1
   * isAuto : 0
   */

  private String bankUrl;
  private int inMax;
  private int inMin;
  private String bankType;
  private int state;
  private int needAccount;
  private String bankName;
  private int seqId;
  private int isAuto;

  @BindingAdapter({"bankImageUrl"})
  public static void loadBankImage(ImageView imageView,String bankType){
    Glide.with(imageView.getContext())
        .load("file:///android_asset/bank/"+"bank_"+bankType.toLowerCase()+".png")
        .apply(new RequestOptions()
            .placeholder(R.drawable.add)
            .error(R.drawable.add)
            .fitCenter())
        .into(imageView);
  }

  public String getBankUrl() {
    return bankUrl;
  }

  public void setBankUrl(String bankUrl) {
    this.bankUrl = bankUrl;
  }

  public int getInMax() {
    return inMax;
  }

  public void setInMax(int inMax) {
    this.inMax = inMax;
  }

  public int getInMin() {
    return inMin;
  }

  public void setInMin(int inMin) {
    this.inMin = inMin;
  }

  public String getBankType() {
    return bankType;
  }

  public void setBankType(String bankType) {
    this.bankType = bankType;
  }

  public int getState() {
    return state;
  }

  public void setState(int state) {
    this.state = state;
  }

  public int getNeedAccount() {
    return needAccount;
  }

  public void setNeedAccount(int needAccount) {
    this.needAccount = needAccount;
  }

  public String getBankName() {
    return bankName;
  }

  public void setBankName(String bankName) {
    this.bankName = bankName;
  }

  public int getSeqId() {
    return seqId;
  }

  public void setSeqId(int seqId) {
    this.seqId = seqId;
  }

  public int getIsAuto() {
    return isAuto;
  }

  public void setIsAuto(int isAuto) {
    this.isAuto = isAuto;
  }
}
